import Troop from "src/Core/Troop";
import Entity, { EntityConfig } from "../Core/Entity";

export default class Person extends Entity {
  troop: Troop;
  constructor(_config: EntityConfig, _troop: Troop) {
    super(_config);
    this.troop = _troop;
  }

  override async Builder() {
    await super.Builder();

    this.model.position.y = this.model.userData.pos.target.y;
  }

  override Dispose() {
    super.Dispose();
    this.troop.sum--;
    this.troop.Regroup();
  }
}
